import _axios, { get } from '../littleu/plugin/axios'
class News {
  async getNewsByCondition (condition) {
    return _axios({
      method: 'post',
      url: '/news/condition',
      data: condition
    })
  }

  async getNewsPaging (page, count) {
    return get('/news/page', {
      page,
      count
    })
  }

  async getNewsDetail (id) {
    return _axios({
      method: 'get',
      url: `/news/${id}`
    })
  }
}

export default new News()
